package com.prg.service;

import com.prg.dao.base.BaseDaoI;
import com.prg.model.base.AuthMenu;
import com.prg.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 14-12-29
 * Time: 下午9:45
 * To change this template use File | Settings | File Templates.
 */

@Service
public class BackupService {

    @Autowired
    private BaseDaoI baseDao;

    public void saveback() {

        savebackupResource(); //回复系统菜单


    }

    private void savebackupResource() {

        AuthMenu xtgl = new AuthMenu();//系统管理
        xtgl.setId("xtgl");
        xtgl.setName("系统管理");
        xtgl.setUrl("");
        xtgl.setDescription("管理系统的资源、角色、机构、用户等信息");
        xtgl.setIconCls("ext-icon-application_view_tile");
        xtgl.setSeq(0);
        baseDao.save(xtgl);
        AuthMenu zygl = new AuthMenu();//资源管理
        zygl.setId("zygl");
        zygl.setName("资源管理");
        zygl.setUrl("/page/test1.jsp");
        zygl.setDescription("");
        zygl.setIconCls("");
        zygl.setAuthMenu(xtgl);
        baseDao.save(zygl);

    }


}
